/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package control.benhan;

import java.util.Date;
import javax.swing.JTable;
import model.entity.PhieuDieuTri;

/**
 *
 * @author Admin
 */
public class BAChiTiet_Dialog_Ctrl {
    
    public static final PhieuDieuTri selectRow(JTable table){
        int row = table.getSelectedRow();
        int maPDT = (Integer) table.getValueAt(row, 0);
        Date ngayDT = (Date)table.getValueAt(row, 1);
        Date ngayTK = (Date)table.getValueAt(row, 1);
        
        PhieuDieuTri pdt = new PhieuDieuTri();
        pdt.setPdtMa(maPDT);
        pdt.setPdtNgayDieuTri(ngayDT);
        pdt.setPdtNgayTaiKham(ngayTK);
        return pdt;
        
    }
    
}
